From 306fa5ad641e49f1232d3ff2d224995e2ecb237f Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Tue, 24 May 2011 16:15:53 +0100 Subject: [PATCH] libxl: improve logging on failure to start device model. Distinguish between device model dying during startup (libxl__spawn_check returns failure) and timing out while waiting for the xenstore node to show up. Signed-off-by: Ian Campbell Acked-by: Ian Jackson Committed-by: Ian Jackson --- tools/libxl/libxl_device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c index a3826bdc1c..cc3ae25d1a 100644 --- a/tools/libxl/libxl_device.c +++ b/tools/libxl/libxl_device.c @@ -445,6 +445,8 @@ int libxl__wait_for_device_model(libxl__gc *gc, if ( starting ) { rc = libxl__spawn_check(gc, starting->for_spawn); if ( rc ) { + LIBXL__LOG(ctx, LIBXL__LOG_ERROR, + "Device Model died during startup"); rc = -1; goto err_died; } @@ -487,10 +489,10 @@ again: } } } + LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "Device Model not ready"); err_died: xs_unwatch(xsh, path, path); xs_daemon_close(xsh); - LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "Device Model not ready"); err: return -1; } -- 2.30.2